#!/bin/bash
expected_args=1
#first argument is path to source code.. second argument is application path
if [ $# -ne $expected_args ]
then
	echo "Please insert path to the source file."
else
	echo "Compiling source.."	
	g++ -o out.o $1 -g -pg
	echo "Running compiled code.."
	./out.o
	echo "Profiling source code.."
	gprof out.o>out.txt
	#get current dir	
	#DIR="$( cd "$( dirname "$0" )" && pwd )"
	#echo $DIR
fi
